public class ThreadDemo4 {
    public static void main(String[] args) throws InterruptedException{
        Thread t = new Thread(() ->{
            for(int i = 0; i < 1000; i++){
                System.out.println("hello t");
            }
        });
        t.start();
        t.join(1);
        System.out.println("hello main!!");
        System.out.println("hello main!!");
        System.out.println("hello main!!");
    }
}
